package com.copa.module.goods.mapper;

import com.copa.module.goods.domain.entity.GoodsProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.copa.module.goods.domain.vo.GoodsProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author copa
 * @createDate 2021-01-07
 * @function t_goods_product表 Mapper 接口
 */
@Mapper
public interface GoodsProductDao extends BaseMapper<GoodsProductEntity> {

    Boolean insertGoodsProductVoList(@Param("goodsProductVo") List<GoodsProductVo> goodsProductVo,
                                     @Param("goodsId") Long goodsId);

    List<GoodsProductEntity> findGoodsProductByGoodsId(@Param("goodsId") Long goodsId);

    Boolean deleteIds(@Param("productIds") List<Long> productIds);

    Boolean updateGoodsProductVoById(@Param("goodsProductVo") GoodsProductVo goodsProductVo);
}
